package com.democaffien.demos.service.impl;

import com.democaffien.demos.service.UserService;
import com.democaffien.demos.entity.User;
import org.springframework.stereotype.Service;

/**
 * @author rise
 * @date 2024年10月30日 15:35
 */
@Service
public class UserServiceImpl implements UserService {
    @Override
    public User add(User user) {
        user.setId(1);
        return user;
    }

    @Override
    public User getById(Integer id) {
        User user = new User();
        user.setId(id);
        return user;
    }

    @Override
    public Integer delete(Integer id) {
        return 0;
    }

    @Override
    public Integer deleteAll() {
        return 5;
    }
}
